package com.bawei.hfgc.frgacty.model;

import com.bawei.hfgc.frgacty.ConfigEntity;
import com.bawei.hfgc.splash.api.Api;
import com.bawei.mvvmcomm.mvvm.model.BaseModel;
import com.bawei.networkmoudle.ChangeFunction;
import com.bawei.networkmoudle.Entity.BaseEntity;
import com.bawei.networkmoudle.HttpFactory;
import com.bawei.networkmoudle.HttpType;

import java.util.Map;

import io.reactivex.Observable;

public class FragmModel extends BaseModel {
    public Observable<BaseEntity> requestConfig(Map<String,Object> map){
        return HttpFactory.getInstance().factory(HttpType.TOKENSIGNTYPE)
                .getRetrofit().create(Api.class)
                .requestConfig(createBody(map))
                .map(new ChangeFunction<ConfigEntity>());
    }
}
